package com.daidai.testsingleinstance

import android.os.Bundle
import android.os.Process
import android.widget.Button
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity

class ThirdActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        val btn = Button(this)
        btn.text = "ThirdActivity"
        btn.setOnClickListener {
            // 杀掉进程,看应用是否会重启
            Process.killProcess(Process.myPid())
        }
        setContentView(btn)

        androidLog("ThirdActivity taskId:$taskId")
    }
}